package com.suray.attendance.db.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.suray.attendance.model.pojo.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: jianglinyu
 * @CreateTime: 2023-07-08  13:56
 * @Description: 钉钉组织架构用户
 * @Version: 1.0
 */
@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    @Insert("<script>" +
            "INSERT INTO ding_user_info (id, union_id, name, dept_id, create_time) VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "(#{item.id}, #{item.unionId}, #{item.name}, #{item.deptId}, #{item.createTime})" +
            "</foreach>" +
            "</script>")
    void batchInsert(@Param("list") List<UserInfo> deptInfoList);



}